import { prop } from '@typegoose/typegoose'
import { EntityModel } from '@midwayjs/typegoose'

class Meta {
  @prop()
  icon: string

  @prop()
  title: string

  @prop()
  showLink: boolean
}

@EntityModel()
export class Menu {
  @prop({ unique: true })
  public id: string

  @prop()
  public path: string

  @prop({ unique: true })
  public name: string

  @prop()
  public component: string

  @prop()
  public redirect: string

  @prop()
  public pid: string

  @prop()
  public meta: Meta
}
